# Maintainer: Noel Kuntze <noel.kuntze@contauro.com>
pkgname=grommunio-error-pages
pkgdesc="Grommunio-branded error pages for web servers"
pkgver=1.0_git20231031
pkgrel=0
arch="noarch !riscv64"
url="https://grommunio.com/"
license="AGPL-3.0-only"
options="!check" # No test suite
makedepends="python3"

_commithash=bb2df37c0856363764e3289e2ac0e5df74ef0c1f

source="$pkgname-$pkgver.tar.gz::https://github.com/grommunio/grommunio-error-pages/archive/$_commithash.tar.gz
	0001-makefile.patch
	0002-conf-webapps-path.patch
	"

builddir="$srcdir/$pkgname-$_commithash/"

build() {
	make
}

check() {
	make check
}

package() {
	mkdir -p "$pkgdir"
	make install DESTDIR="$(realpath $pkgdir)"

	# license
	install -Dm0644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

sha512sums="
a2b8c2531efaae2538c97b595921c9fb62983846fae65bea55a4b234dab5240b0ac78e5a97a4cfcd5e085d318f123239669e311850a3995ad3c7a922e7c4ec43  grommunio-error-pages-1.0_git20231031.tar.gz
19ab02ce7567c23cdc5ce83871b28946e1b755228bb5bb0f949ec3ff4864be0c17fa75d0365d0ba0ffe2caaebffc2a141f57faf2c44b812a08f0a9443fe3767f  0001-makefile.patch
31821d337a03f10ac4a42097e4337817e6bace1f9206043f445428e7734ac33a746d51e1b478c4e805914265ac195008aede467db6bdbe6bda1f4cc92e36669a  0002-conf-webapps-path.patch
"
